package com.mktech.taraservicelib.util;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import com.mktech.taraservicelib.entity.homefetch.HomeFetchRequestVo;
import com.mktech.taraservicelib.entity.login.LoginRequstBean;


public class ConstructParamsUtil
{
	public static Map<String, String> constructLoginParmas(LoginRequstBean bean)
	{
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("ApiKey", bean.getApiKey());
		map.put("LangID", bean.getLangID());
		map.put("LangKey", bean.getLangKey());
		map.put("Email", bean.getEmail());
		map.put("Password", bean.getPassword());
		map.put("DeviceToken", bean.getDeviceToken());
		map.put("Longitude", bean.getLongitude());
		map.put("Latitude", bean.getLatitude());
		map.put("AccessedThrough", bean.getAccessedThrough());
		map.put("Device", bean.getDevice());
		map.put("OS", bean.getOS());
		map.put("OsVersion", bean.getOsVersion());
		map.put("TimeZone", bean.getTimeZone());
		map.put("Country", bean.getCountry());
		map.put("CountryCode", bean.getCountryCode());
		map.put("State", bean.getState());
		map.put("City", bean.getCity());
		map.put("Street", bean.getStreet());
		map.put("IP", bean.getIP());
		map.put("IPStatus", bean.getIPStatus());
		map.put("Brand", bean.getBrand());
		map.put("ConnectionType", bean.getConnectionType());
		map.put("MobileOperator", bean.getMobileOperator());
		map.put("Model", bean.getModel());
		
		Set<String> keySet = map.keySet();
		for(Iterator<String> i = keySet.iterator(); i.hasNext();)
		{
			String key = i.next();
			LogTool.i("key = "+key+"\tvalue = "+map.get(key));
		}
		return map;
	}
	
	public static Map<String, String> constructHomeFetchParmas(HomeFetchRequestVo bean)
	{
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("ApiKey", bean.getApiKey());
		map.put("LangID", bean.getLangID());
		map.put("LangKey", bean.getLangKey());
		map.put("UserID", bean.getUserID());
		map.put("AccessID", bean.getAccessID());
		map.put("Tabs", bean.getTabs());
		
		Set<String> keySet = map.keySet();
		for(Iterator<String> i = keySet.iterator(); i.hasNext();)
		{
			String key = i.next();
			LogTool.i("key = "+key+"\tvalue = "+map.get(key));
		}
		return map;
	}
}
